<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>a64l</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_001_041">&nbsp;</a>NAME</h4><blockquote>
<br>
a64l, l64a - convert between a 32-bit integer and a radix-64 ASCII string
</blockquote><h4><a name = "tag_000_001_042">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="stdlib.h.html">stdlib.h</a>&gt;

long a64l(const char *<i>s</i>);
char *l64a(long <i>value</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_001_043">&nbsp;</a>DESCRIPTION</h4><blockquote>
These functions are used to maintain numbers stored in radix-64 ASCII
characters.  This is a notation by which 32-bit integers can be represented by
up to six characters; each character represents a digit in radix-64 notation.
If the type <b>long</b> contains more than 32 bits, only the low-order 32 bits
are used for these operations.
<p>
The characters used to represent `digits' are '.' for 0, '/'
for 1, '0' through '9' for 2-11, 'A'
through 'Z' for 12-37, and 'a' through 'z' for 38-63.
<p>
The
<i>a64l()</i>
function takes a pointer to a radix-64 representation, in which
the first digit is the least significant, and returns a corresponding
<b>long</b> value.  If the string pointed to by <i>s</i> contains more than six
characters,
<i>a64l()</i>
uses the first six.  If the first six characters of the string contain a null
terminator,
<i>a64l()</i>
uses only characters preceding the null terminator.  The
<i>a64l()</i>
function scans the character string from left to right with the least
significant digit on the left, decoding each character as a 6-bit radix-64
number.
If the type <b>long</b> contains more than 32 bits, the resulting value is
sign-extended.  The behaviour of
<i>a64l()</i>
is unspecified if <i>s</i> is a null pointer or the string pointed to by
<i>s</i> was not generated by a previous call to
<i>l64a()</i>.
<p>
The
<i>l64a()</i>
function takes a <b>long</b>
argument and returns a pointer to the corresponding radix-64 representation.
The behaviour of
<i>l64a()</i>
is unspecified if <i>value</i> is negative.
<p>
The value returned by
<i>l64a()</i>
may be a pointer into a static buffer.  Subsequent calls to
<i>l64a()</i>
may overwrite the buffer.
<p>
The
<i>l64a()</i>
interface need not be reentrant.
An interface that is not required to be reentrant is not required to be
thread-safe.
</blockquote><h4><a name = "tag_000_001_044">&nbsp;</a>RETURN VALUE</h4><blockquote>
<br>
On successful completion,
<i>a64l()</i>
returns the <b>long</b> value resulting from conversion of the input
string.  If a string pointed to by <i>s</i> is an empty string,
<i>a64l()</i>
returns 0L.
<p>
The
<i>l64a()</i>
function returns a pointer to the radix-64 representation.  If <i>value</i> is
0L,
<i>l64a()</i>
returns a pointer to an empty string.
</blockquote><h4><a name = "tag_000_001_045">&nbsp;</a>ERRORS</h4><blockquote>
<br>
No errors are defined.
</blockquote><h4><a name = "tag_000_001_046">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_047">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
If the type <b>long</b> contains more than 32 bits, the result of
<i>a64l</i>(<i>l64a</i>(<i>x</i>)) is <i>x</i> in the low-order 32 bits.
</blockquote><h4><a name = "tag_000_001_048">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_049">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="strtoul.html">strtoul()</a></i>,
<i><a href="stdlib.h.html">&lt;stdlib.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
